import java.io.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        String str;
        Scanner scanner = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        //*******************begin**********************
        while(scanner.hasNext()) {
            str=scanner.next();
            if(str.equals("!")) {
                break;
            }
            sb.append(str).append(" ");
        }
        //********************end***********************
        System.out.println(sb);
    }
}